package com.kylin.core.payment.event.listener;

import com.kylin.domain.payment.command.AsyncWechatPayCommand;
import com.kylin.domain.payment.command.PaymentNotifyCommand;
import com.kylin.domain.payment.command.PaymentRefundCommand;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.axonframework.commandhandling.CommandHandler;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * 支付命令处理类
 * @author Damon S.
 * @version v1.0.1
 * @date 2021年01月24日 19:08
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class PayCommandHandler {


    @CommandHandler
    @Transactional(rollbackFor = Exception.class)
    public void handle(AsyncWechatPayCommand command) {

    }

    @CommandHandler
    @Transactional(rollbackFor = Exception.class)
    public void handle(PaymentNotifyCommand command) {

    }

    @CommandHandler
    @Transactional(rollbackFor = Exception.class)
    public void handle(PaymentRefundCommand command) {

    }
}
